//
//  NormalShopGoodsModel.m
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/8/8.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "NormalShopGoodsModel.h"

@implementation NormalShopGoodsModel

- (NormalShopGoodsModel *)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.type = dict[@"type"];
        self.name = dict[@"name"];
        self.subtitle = dict[@"subtitle"];
        self.price = [dict[@"price"] floatValue];
        self.freightInMaxCount = [dict[@"freightInMaxCount"] floatValue];
        self.freightInEveryAdd = [dict[@"freightInEveryAdd"] floatValue];
        self.productNo = dict[@"productNo"];
        self.thumbnailUrl = dict[@"thumbnailUrl"];
        
        self.avgStartLevel = [dict[@"avgStartLevel"] integerValue];
        self.bannerType = dict[@"bannerType"];
        self.distance = dict[@"distance"];
        self.freightMaxCount = [dict[@"freightMaxCount"] integerValue];
        self.role = [dict[@"role"] integerValue];
        self.total = [dict[@"total"] integerValue];
        self.access = dict[@"access"];
        
        self.productInShopCarCount = [dict[@"productInShopCarCount"] integerValue];
        self.residualStock = [dict[@"residualStock"] integerValue];
        self.shopId = dict[@"integerValue"];
        self.status = [dict[@"status"] integerValue];
    }
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[NormalShopGoodsModel alloc]initWithDict:dict];
}

@end
